import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/user/login',
    method: 'post',
    data
  })
}

export function register(data) {
  return request({
    url: '/user/register',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/user/info',
    method: 'get',
    params: { token }
  })
}


export function logout() {
  return request({
    url: '/user/logout',
    method: 'post'
  })
}

export function getuserdata(token) {
  return request({
    url: '/user/getuserdata',
    method: 'post',
    params:{token}

  })
}
export function edituser(data) {
  return request({
    url: '/user/edituser',
    method: 'post',
    data
  })
}
export function updatepass(password,token) {
  return request({
    url: '/user/updatepass',
    method: 'post',
    params:{password,token}
  })
}

export function getallmanager() {
  return request({
    url: '/user/getallmanager',
    method: 'post',
   
  })
}
export function getalluser() {
  return request({
    url: '/user/getalluser',
    method: 'post',
   
  })
}

export function editgsuser(data) {
  return request({
    url: '/user/editgsuser',
    method: 'post',
   data
  })
}

export function deletegUser(data) {
  return request({
    url: '/user/deletegUser',
    method: 'post',
   data
  })
}
export function addgsuser(data) {
  return request({
    url: '/user/addgsuser',
    method: 'post',
   data
  })
}

export function editysuser(data) {
  return request({
    url: '/user/editysuser',
    method: 'post',
   data
  })
}

export function deleteyUser(data) {
  return request({
    url: '/user/deleteyUser',
    method: 'post',
   data
  })
}
export function addysuser(data) {
  return request({
    url: '/user/addysuser',
    method: 'post',
   data
  })
}